<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>{$sysInfo.title} - 登录</title>
    <link rel="stylesheet" href="<?php echo ROOT_URL; ?>/public/system/css/amazeui.min.css">
    <link rel="stylesheet" href="<?php echo ROOT_URL; ?>/public/system/css/login.css">
</head>
<body>
<div class="login-body">
    <header>
         <div class="logo">
            <img src="<?php echo ROOT_URL; ?>/public/system/images/avatar.png" height="120">
        </div>
        <h1>{$sysInfo.title}</h1>
    </header>
    <main>
        <form method="post" class="am-form" action="{url()}">
            <div class="am-form-group">
                <label><i class="am-icon-user"></i></label>
                <input type="text" name="username" value="">
            </div>
            <div class="am-form-group">
                <label><i class="am-icon-key"></i></label>
                <input type="text" onfocus="this.type='password'" name="password" value="">
            </div>
            <div class="am-form-group">
                <div class="alert hide">222</div>
            </div>
            <div class="am-form-group">
                <button type="submit" class="am-btn am-btn-primary am-btn-block">登 录</button>
            </div>
        </form>
    </main>
</div>
</body>
<script type="text/javascript" src="<?php echo ROOT_URL; ?>/public/system/js/lib/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo ROOT_URL; ?>/public/system/js/lib/do.js" data-cfg-autoload="false"></script>
<script type="text/javascript" src="<?php echo ROOT_URL; ?>/public/system/js/lib/init.js" data-path="<?php echo ROOT_URL; ?>/public/system/js/" data-role="<?php echo ROLE_NAME; ?>" data-root="<?php ROOT_URL; ?>"></script>
<script>
    $(function () {
        Do('base', function() {
        $('form').submit(function (e) {
            e.preventDefault();
            app.ajax({
                url : '{url()}',
                type : 'post',
                data : $('form').serialize(),
                tip : false,
                success : function(msg) {
                    $('.alert').addClass('hide');
                    window.location.href = '{url("system/Index/index")}';
                },
                error : function(msg) {
                    $('.alert').removeClass('hide').text(msg);
                }
            });
        });

        });
    });
</script>
</html>